<template>
  <div class="page">
    <Navbar title="项目授权" />
    <van-pull-refresh v-model="refreshLoading" @refresh="onRefresh">
      <div class="list-item">
        <div class="header f-r j-b a-c">
          <div class="title">{{ detail.projectName }}</div>
        </div>
        <div class="label">
          项目类型：{{ detail.projectType }}
        </div>
        <div class="label">
          我的代办员：{{ detail.handleLeader }} {{ detail.handlePhone }}
        </div>
        <div class="label">
          总投资：{{ detail.totalAmount }}（万元）
        </div>
        <div class="label">
          进度状态：{{ detail.progressName }}
        </div>
        <div class="label" style="margin-bottom: 0">
          领码日期：{{ detail.codingTime }}
        </div>
      </div>
      <el-button type="primary" style="width: 100%;margin: 20px 0;" @click="confirm">确认授权</el-button>
    </van-pull-refresh>
  </div>
</template>

<script>
import refresh from '@/mixins/refresh'
import { http_project } from '@/api'
import { progressStatus } from '@/eumn'

export default {
  name: 'ProjectAuthDetail',
  mixins: [refresh],
  data() {
    return {
      detail: {
      }
    }
  },
  methods: {
    onRefresh() {
      const { projectId } = this.$route.query
      http_project.detail({
        id: projectId
      }).then(res => {
        this.detail = {
          ...res.data,
          progressName: progressStatus.getName(res.data.progress)
        }
      })
    },
    confirm() {}
  }
}
</script>

<style scoped lang="scss">
.page {
    .list-item {
        width: 100%;
        background: #FFFFFF;
        border-radius: 10px;
        padding: 20px;
        .header {
            .title {
                height: 17px;
                font-size: 18px;
                font-family: PingFang SC;
                font-weight: 500;
                color: #333333;
                margin-right: 10px;
            }
            margin-bottom: 23px;
        }
        .label {
            font-size: 15px;
            line-height: 15px;
            height: 15px;
            color: #333333;
            margin-bottom: 15px;
            &:last-of-type {
                margin-bottom: 0;
            }
        }
    }
    .el-button {
        background-color: #2F86FD;
        border-color: #2F86FD;
        border-radius: 10px;
    }
}
</style>
